import Vue from 'vue'
import VueRouter from 'vue-router'
import IndexView from "@/views/index/IndexView.vue";
import RearbView from "@/views/nearby/RearbView.vue";
import BrandAndCarView from "@/views/index/brandAndCar/BrandAndCarView.vue";
import ReserveView from "@/views/reserve/ReserveView.vue";
import ReviewView from "@/views/review/ReviewView.vue";
import ScreenView from "@/views/index/ScreenView.vue";
import detailsView from "@/views/details/detailsView.vue";
import OrderDetailsView from "@/views/reserve/orderdetails/OrderDetailsView.vue";
import NearbyView from "@/views/details/map/NearbyView.vue";
import CollectionView from "@/views/nearby/collection/CollectionView.vue";
import CarRentalView from "@/views/details/carRental/CarRentalView.vue";
import ScheduledDetail from "@/views/details/scheduleddetail/ScheduledDetail.vue";
import SettingsView from "@/views/my/SettingsView.vue";
import MyView from "@/views/my/MyView.vue";
import RentalDetailsView from "@/views/my/RentalDetailsView.vue";
import CertificationsView from "@/views/my/CertificationsView.vue";
import LoginView from "@/views/login/LoginView.vue";
import EvaluateView from "@/views/my/EvaluateView.vue";
import MessagingView from "@/views/index/messaging/MessagingView.vue";
import PaymentView from "@/views/payment/PaymentView.vue";
import ChatModel from "@/views/my/ChatModel.vue";



Vue.use(VueRouter)

const routes = [

  //   ai
  {
    path: '/chatmodel',
    name: 'chatmodel',
    component: ChatModel
  },

  //   我要租车
  {
    path: '/carRental',
    name: 'carRental',
    component: CarRentalView
  },
  //   预定详情
  {
    path: '/scheduledDetail',
    name: 'scheduledDetail',
    component: ScheduledDetail

  },
  {
    path: '/screen',
    name: 'screen',
    component: ScreenView
  },
    //收藏
  {
    path: '/collection',
    name: 'collection',
    component: CollectionView
  },
    //附近的车
  {

    path: '/nearby',
    name: 'nearby',
    component: NearbyView
  },
  //   全部评价
  {
    path: '/review',
    name: 'review',
    component: ReviewView
  },
  {
    path: '/details',
    name: 'details',
    component: detailsView

  },
  {
    path: '/messaging',
    name: 'messaging',
    component: MessagingView
  },

  {
    path: '/orderDetails',
    name: 'orderDetails',
    component: OrderDetailsView
  },
  //   附近
  {
    path: '/rearby',
    name: 'rearby',
    component: RearbView
  },
  //   首页
  {
    path: '/',
    name: 'index',
    component: IndexView
  },
  //   我的
  //   预定
  {
    path: '/reserve',
    name: 'reserve',
    component: ReserveView
  },
  // 品牌和车
  {
    path: '/brandAndCar',
    name: 'brandAndCar',
    component: BrandAndCarView
  },
  {
    path: '/my',
    name: 'my',
    component: MyView
  },
  {
    path: '/settings',
    name: 'settings',
    component: SettingsView
  },
  {
    path: '/rentalDetails',
    name: 'rentalDetails',
    component: RentalDetailsView
  },
  {
    path: '/certifications',
    name: 'certifications',
    component: CertificationsView
  },
  {
    path: '/login',
    name: 'login',
    component: LoginView
  },
  {
    path: '/payment',
    name: 'payment',
    component: PaymentView
  },
  {
    path: '/evaluate',
    name: 'evaluate',
    component: EvaluateView
  },

  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
